package com.yxh.sse.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.apache.log4j.Logger;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;


import com.yxh.sse.config.ProjectConfig;



public class StartUp extends HibernateDaoSupport implements ServletContextListener {
	

	private Logger log=Logger.getLogger(StartUp.class);
	
	@Override
	public void contextDestroyed(ServletContextEvent arg0) {
		// get
//		 Transaction tx=getSession().beginTransaction();
//		 tx.commit();
//		 getSession().flush();

	}

	@Override
	public void contextInitialized(ServletContextEvent evnt) {
		
	
		
		ProjectConfig.WEB_PHYSICAL_PATH=evnt.getServletContext().getRealPath("");
        log.warn(ProjectConfig.WEB_PHYSICAL_PATH);
        Config cfga=new Config();
        cfga.start();
        
       
	}

}
